<?php
$tm = $_GET['tm'];
include("database.php");
$sql = "SELECT * FROM main WHERE num = '".$tm."' ";
$res=$conn->query($sql);
$data=$res->fetch_all();
$conn->close();
echo json_encode($data);
?>